<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>库存期初建账管理</title>
<meta name="decorator" content="default" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript">
	$(document).ready(function() {
		//$("#name").focus();
		$("#inputForm").validate({
			submitHandler : function(form) {
				loading('正在提交，请稍等...');
				form.submit();
			},
			errorContainer : "#messageBox",
			errorPlacement : function(error, element) {
				$("#messageBox").text("输入有误，请先更正。");
				if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
					error.appendTo(element.parent().parent());
				} else {
					error.insertAfter(element);
				}
			}
		});
	});
</script>
<style type="text/css">
.minWidth {
	min-width: 500px;
}

@media ( min-width : 789px) and (max-width: 1098px) {
	.secondChild {
		margin-left: 0
	}
}
</style>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="#">建账信息</a></li>
	</ul>
	<br />
	<form:form id="inputForm" modelAttribute="bsRecord" action="${ctx}/vaccinate/bsProduct/save" method="post" class="form-horizontal">
		<form:hidden path="id" />
		<sys:message content="${message}" />
		<div class="container-fluid">
			<div class="row-fluid">
				<div class="control-group span4 minWidth">
					<label class="control-label">疫苗小类编码:</label>
					<div class="controls">
						<form:input path="bsVaccineBatchno.vaccineId"  htmlEscape="false" maxlength="20"
							disabled="true" class="span9 required digits" />
					</div>
				</div>
				
				<div class="control-group span4 minWidth">
					<label class="control-label">疫苗名称:</label>
					<div class="controls">
						<form:input path="bsVaccineBatchno.vaccineName" htmlEscape="false" maxlength="50"
							disabled="true" class="span9 " />
					</div>
				</div>
			</div>

			<div class="row-fluid">
				<div class="control-group span4 minWidth secondChild">
					<label class="control-label">生产企业编码:</label>
					<div class="controls">
						<form:input path="bsVaccineBatchno.companyCode" htmlEscape="false" maxlength="50"
							disabled="true" class="span9 " />
					</div>
				</div>
				<div class="control-group span4 minWidth secondChild">
					<label class="control-label">生产企业:</label>
					<div class="controls">
						<form:input path="bsVaccineBatchno.companyName" htmlEscape="false" maxlength="50"
							disabled="true" class="span9 " />
					</div>
				</div>
			</div>

			<div class="row-fluid">
				<div class="control-group span4 minWidth">
					<label class="control-label">类型:</label>
					<div class="controls">
						<form:select path="product.cType" class="span9 required" disabled="true">
							<form:option value="" label="--请选择--"/>
							<form:options items="${fns:getDictList('bs_vaccine_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
						</form:select>
					</div>
				</div>
				<div class="control-group span4 minWidth">
					<label class="control-label">规格(剂/支或粒):</label>
					<div class="controls">
						<form:input path="bsVaccineBatchno.spec" htmlEscape="false" maxlength="50"
							disabled="true" class="span9 " />
					</div>
				</div>
			</div>
			<div class="row-fluid">
				<div class="control-group span4 minWidth">
					<label class="control-label">成本价:</label>
					<div class="controls">
						<form:input path="product.orignprice" htmlEscape="false" maxlength="18"
							disabled="true" class="span9" />
					</div>
				</div>
				<div class="control-group span4 minWidth">
					<label class="control-label">出售价:</label>
					<div class="controls">
						<form:input path="product.sellprice" htmlEscape="false" maxlength="18" 
							disabled="true" class="span9" />
					</div>
				</div>

			</div>
			<div class="row-fluid">
				<div class="control-group span4 minWidth secondChild">
					<label class="control-label">批号:</label>
					<div class="controls">
						<form:input path="bsVaccineBatchno.batchno" htmlEscape="false" maxlength="20"
							disabled="true" class="span9 required" />
					</div>
				</div>
				<div class="control-group span4 minWidth secondChild">
					<label class="control-label">建账库存(支或粒):</label>
					<div class="controls">
						<form:input path="num" htmlEscape="false" maxlength="20"
							class="span9 required digits" />
					</div>
				</div>
			</div>
			<div class="row-fluid">
				<div class="control-group span4 minWidth secondChild">
					<label class="control-label">疫苗有效期:</label>
					<div class="controls">
						<input name="bsVaccineBatchno.outBoundDate" id ="outBoundDate" type="text" disabled="true" maxlength="20" class="span9 Wdate"
						value="<fmt:formatDate value="${bsRecord.bsVaccineBatchno.outBoundDate}" pattern="yyyy-MM-dd"/>"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
					</div>
				</div>
				<div class="control-group span4 minWidth secondChild">
					<label class="control-label">实际库存:</label>
					<div class="controls">
						<form:input path="product.storenum" htmlEscape="false" maxlength="20" disabled="true"
							class="span9 required digits" />
					</div>
				</div>
			</div>
			<div class="row-fluid">
				<div class="control-group span4 minWidth">
					<label class="control-label">剂型：</label>
					<div class="controls">
						<form:input path="bsVaccineBatchno.doseType" class="span9 " disabled="true"/>
					</div>
				</div>
			</div>
			<div class="row-fluid">
			<div class="control-group span4 minWidth secondChild">
					<label class="control-label">剂量：</label>
					<div class="controls">
						<form:input path="bsVaccineBatchno.dose" class="span9 required" disabled="true"/>
					</div>
				</div>
			</div>
			<div class="row-fluid">
				<div class="form-actions span8">
				    <c:if test="${recordEdit != true}">
						<shiro:hasPermission name="vaccinate:bsProduct:edit">
						<input id="btnCancel" class="btn btn-primary" type="submit" value="保存"/> 
						</shiro:hasPermission>
				    </c:if>
					<input id="btnCancel" class="btn btn-primary" type="button" value="返 回"
						onclick="history.go(-1)" />
				</div>
			</div>

		</div>

	</form:form>
</body>
</html>